3.12.16 \(\int \frac {(A+B x) (a+c x^2)}{d+e x} \, dx\)

Optimal. Leaf size=86 \[ -\frac {\left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{e^4}+\frac {x \left (a B e^2-A c d e+B c d^2\right )}{e^3}-\frac {c x^2 (B d-A e)}{2 e^2}+\frac {B c x^3}{3 e} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 86, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {772} \begin {gather*} \frac {x \left (a B e^2-A c d e+B c d^2\right )}{e^3}-\frac {\left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{e^4}-\frac {c x^2 (B d-A e)}{2 e^2}+\frac {B c x^3}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a + c*x^2))/(d + e*x),x]

[Out]

((B*c*d^2 - A*c*d*e + a*B*e^2)*x)/e^3 - (c*(B*d - A*e)*x^2)/(2*e^2) + (B*c*x^3)/(3*e) - ((B*d - A*e)*(c*d^2 +
a*e^2)*Log[d + e*x])/e^4

Rule 772

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegr
and[(d + e*x)^m*(f + g*x)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a+c x^2\right )}{d+e x} \, dx &=\int \left (\frac {B c d^2-A c d e+a B e^2}{e^3}+\frac {c (-B d+A e) x}{e^2}+\frac {B c x^2}{e}+\frac {(-B d+A e) \left (c d^2+a e^2\right )}{e^3 (d+e x)}\right ) \, dx\\ &=\frac {\left (B c d^2-A c d e+a B e^2\right ) x}{e^3}-\frac {c (B d-A e) x^2}{2 e^2}+\frac {B c x^3}{3 e}-\frac {(B d-A e) \left (c d^2+a e^2\right ) \log (d+e x)}{e^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 80, normalized size = 0.93 \begin {gather*} \frac {e x \left (6 a B e^2+3 A c e (e x-2 d)+B c \left (6 d^2-3 d e x+2 e^2 x^2\right )\right )-6 \left (a e^2+c d^2\right ) (B d-A e) \log (d+e x)}{6 e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a + c*x^2))/(d + e*x),x]

[Out]

(e*x*(6*a*B*e^2 + 3*A*c*e*(-2*d + e*x) + B*c*(6*d^2 - 3*d*e*x + 2*e^2*x^2)) - 6*(B*d - A*e)*(c*d^2 + a*e^2)*Lo
g[d + e*x])/(6*e^4)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(A+B x) \left (a+c x^2\right )}{d+e x} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[((A + B*x)*(a + c*x^2))/(d + e*x),x]

[Out]

IntegrateAlgebraic[((A + B*x)*(a + c*x^2))/(d + e*x), x]

________________________________________________________________________________________

fricas [A]  time = 0.41, size = 98, normalized size = 1.14 \begin {gather*} \frac {2 \, B c e^{3} x^{3} - 3 \, {\left (B c d e^{2} - A c e^{3}\right )} x^{2} + 6 \, {\left (B c d^{2} e - A c d e^{2} + B a e^{3}\right )} x - 6 \, {\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} \log \left (e x + d\right )}{6 \, e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="fricas")

[Out]

1/6*(2*B*c*e^3*x^3 - 3*(B*c*d*e^2 - A*c*e^3)*x^2 + 6*(B*c*d^2*e - A*c*d*e^2 + B*a*e^3)*x - 6*(B*c*d^3 - A*c*d^
2*e + B*a*d*e^2 - A*a*e^3)*log(e*x + d))/e^4

________________________________________________________________________________________

giac [A]  time = 0.15, size = 97, normalized size = 1.13 \begin {gather*} -{\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} e^{\left (-4\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{6} \, {\left (2 \, B c x^{3} e^{2} - 3 \, B c d x^{2} e + 6 \, B c d^{2} x + 3 \, A c x^{2} e^{2} - 6 \, A c d x e + 6 \, B a x e^{2}\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="giac")

[Out]

-(B*c*d^3 - A*c*d^2*e + B*a*d*e^2 - A*a*e^3)*e^(-4)*log(abs(x*e + d)) + 1/6*(2*B*c*x^3*e^2 - 3*B*c*d*x^2*e + 6
*B*c*d^2*x + 3*A*c*x^2*e^2 - 6*A*c*d*x*e + 6*B*a*x*e^2)*e^(-3)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 116, normalized size = 1.35 \begin {gather*} \frac {B c \,x^{3}}{3 e}+\frac {A c \,x^{2}}{2 e}-\frac {B c d \,x^{2}}{2 e^{2}}+\frac {A a \ln \left (e x +d \right )}{e}+\frac {A c \,d^{2} \ln \left (e x +d \right )}{e^{3}}-\frac {A c d x}{e^{2}}-\frac {B a d \ln \left (e x +d \right )}{e^{2}}+\frac {B a x}{e}-\frac {B c \,d^{3} \ln \left (e x +d \right )}{e^{4}}+\frac {B c \,d^{2} x}{e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(c*x^2+a)/(e*x+d),x)

[Out]

1/3*B*c/e*x^3+1/2/e*A*x^2*c-1/2/e^2*B*x^2*c*d-1/e^2*A*x*c*d+1/e*B*x*a+1/e^3*B*x*c*d^2+1/e*ln(e*x+d)*a*A+1/e^3*
ln(e*x+d)*A*c*d^2-1/e^2*ln(e*x+d)*a*B*d-1/e^4*ln(e*x+d)*B*c*d^3

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 97, normalized size = 1.13 \begin {gather*} \frac {2 \, B c e^{2} x^{3} - 3 \, {\left (B c d e - A c e^{2}\right )} x^{2} + 6 \, {\left (B c d^{2} - A c d e + B a e^{2}\right )} x}{6 \, e^{3}} - \frac {{\left (B c d^{3} - A c d^{2} e + B a d e^{2} - A a e^{3}\right )} \log \left (e x + d\right )}{e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x^2+a)/(e*x+d),x, algorithm="maxima")

[Out]

1/6*(2*B*c*e^2*x^3 - 3*(B*c*d*e - A*c*e^2)*x^2 + 6*(B*c*d^2 - A*c*d*e + B*a*e^2)*x)/e^3 - (B*c*d^3 - A*c*d^2*e
 + B*a*d*e^2 - A*a*e^3)*log(e*x + d)/e^4

________________________________________________________________________________________

mupad [B]  time = 1.68, size = 100, normalized size = 1.16 \begin {gather*} x^2\,\left (\frac {A\,c}{2\,e}-\frac {B\,c\,d}{2\,e^2}\right )+x\,\left (\frac {B\,a}{e}-\frac {d\,\left (\frac {A\,c}{e}-\frac {B\,c\,d}{e^2}\right )}{e}\right )+\frac {\ln \left (d+e\,x\right )\,\left (-B\,c\,d^3+A\,c\,d^2\,e-B\,a\,d\,e^2+A\,a\,e^3\right )}{e^4}+\frac {B\,c\,x^3}{3\,e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + c*x^2)*(A + B*x))/(d + e*x),x)

[Out]

x^2*((A*c)/(2*e) - (B*c*d)/(2*e^2)) + x*((B*a)/e - (d*((A*c)/e - (B*c*d)/e^2))/e) + (log(d + e*x)*(A*a*e^3 - B
*c*d^3 - B*a*d*e^2 + A*c*d^2*e))/e^4 + (B*c*x^3)/(3*e)

________________________________________________________________________________________

sympy [A]  time = 0.33, size = 82, normalized size = 0.95 \begin {gather*} \frac {B c x^{3}}{3 e} + x^{2} \left (\frac {A c}{2 e} - \frac {B c d}{2 e^{2}}\right ) + x \left (- \frac {A c d}{e^{2}} + \frac {B a}{e} + \frac {B c d^{2}}{e^{3}}\right ) - \frac {\left (- A e + B d\right ) \left (a e^{2} + c d^{2}\right ) \log {\left (d + e x \right )}}{e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(c*x**2+a)/(e*x+d),x)

[Out]

B*c*x**3/(3*e) + x**2*(A*c/(2*e) - B*c*d/(2*e**2)) + x*(-A*c*d/e**2 + B*a/e + B*c*d**2/e**3) - (-A*e + B*d)*(a
*e**2 + c*d**2)*log(d + e*x)/e**4

________________________________________________________________________________________